﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DFGK_WMS.Context.Migrations
{
    public partial class addIsUniqueInInventoty : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateIndex(
                name: "IX_T_Inventory_LocationCode",
                table: "T_Inventory",
                column: "LocationCode",
                unique: true,
                filter: "[LocationCode] IS NOT NULL");

            migrationBuilder.CreateIndex(
                name: "IX_T_Inventory_PalletBarcode",
                table: "T_Inventory",
                column: "PalletBarcode",
                unique: true,
                filter: "[PalletBarcode] IS NOT NULL");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropIndex(
                name: "IX_T_Inventory_LocationCode",
                table: "T_Inventory");

            migrationBuilder.DropIndex(
                name: "IX_T_Inventory_PalletBarcode",
                table: "T_Inventory");
        }
    }
}
